package yawning.mew.bear;

import yawning.mew.bear.BearThreatSimulator.BearTargetData;
import yawning.mew.sim.SimulationEventAction;

public class ShatteringThrowEvent extends SimulationEventAction {
	private BearThreatSimulator mState;
	private BearTargetData mTargetData;

	ShatteringThrowEvent(BearThreatSimulator state, BearTargetData targetData) {
		super(state.mSimEngine);
		mState = state;
		mTargetData = targetData;
	}

	@Override
	public double perform() {
		schedule(mState.mModel.shatteringThrowDebuffDuration);
		mTargetData.setArmorMinorMult(mState.mModel.debuffShatteringThrow);

		if (mState.mIsLogging) mState.mLog.log("Shattering Throw\n");

		return 0.0;
	}

	@Override
	public void onExpire() {
		if (mState.mIsLogging) mState.mLog.log("Shattering Throw Expiration\n");

		mTargetData.setArmorMinorMult(1.0);
	}
}
